<template>
  <h1>home页</h1>
  <p>{{ $store.state.count }}</p>
  <p>{{ store.state.count }}</p>
  <el-button>按钮</el-button>
</template>

<script setup lang="ts">
// 方式1
// import { useStore } from 'vuex'
// import { key } from '../../store'
// const store = useStore(key)

// 方式2
import { getLoginInfo } from '@/api/common'
import { onMounted, ref } from 'vue'
import { useStore } from '../../store'
import type { ILoginInfo } from '@/api/types/common'
const store = useStore()

console.log(store.state.count)
const list = ref<ILoginInfo['slide']>([])
onMounted(async () => {
  const data = await getLoginInfo()
  list.value = data.slide
  console.log(data)
})

</script>

<style scoped lang="scss">
// @import '@/styles/variables.scss'
// @import '~@/variables.scss'
h1{
  color: $color;
}
</style>
